package com.cyou.qb.face.simple;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;

public class ParseXml {
	
	public static void main(String[] args) throws DocumentException {
		String xml="<?xml version='1.0' encoding='utf-8' ?><root><flag>1</flag><act_id>123456</act_id></root> ";
		Document doc = DocumentHelper.parseText(xml);
		Element root = doc.getRootElement();
		Element flagEle= root.element("flag");
		String flag = flagEle.getText();
		System.out.println(flag);
	}
}
